# What's new in JBuilder 4

JBuilder 4 has several suites of new features and customer-requested enhancements of existing features.

- Web development, Enterprise JavaBeans, and Team development are the focus of new features in this release.
- The OpenTools API has been extended and is easier to work with.
- Application server support has expanded.
- The User Interface is redesigned, notably the File|Open dialogs and many of the wizards, including the Archive Builder.
- The debugger feature set is expanded.
- Database handling is easier: JDataStore and JDBC Explorer are improved.

JBuilder 4 is tested on Solaris, Linux, and Windows 98, NT, and 2000. JBuilder 4 is hosted on JDK version 1.3 in order to take advantage of its debugging capabilities and enhanced client-side performance. You can still build applications for any prior version of the JDK.

## Web Development

JBuilder 4 supports the development of web applications in a number of ways. It provides expanded XML support. It provides better servlet and JSP support. InternetBeans Express, a suite of components, allows you to transfer data between Java and HTML seamlessly. Web Debug and Web Run let you test your web applications right from the AppBrowser. Right-click in the project pane to access these two features.

### JavaServer Pages and servlet support

JBuilder 4 lets you run and debug servlets and JSPs on TomcatTM 3.1, the reference implementation of Servlet 2.2/JSP 1.1. For more information on Tomcat, refer to Apache Software Foundation's Jakarta web site at http://jakarta.apache.org

Each servlet may have an alias (servlet-name) and `init()` parameters, and can be executed directly without an SHTML file. The web server can also have context parameters and a context path to make the development configuration match the deployment configuration more closely.

JBuilder 4 provides extended JSP support. Debugging your JSP is easy, as you can debug your source code directly. CodeInsight, ErrorInsight, and syntax highlighting are supported in JSP files.

For more information on JSPs, see "Developing JavaServer Pages" in the Distributed Applications Guide. For more information on servlets, see "Developing Servlets" in the Distributed Applications Developer's Guide.

This product includes software developed by the Apache Software Foundation (http://www.apache.org/) which is released with the following copyright:
Copyright (c) 2000 The Apache Software Foundation. All rights reserved.
This software from the Apache Software Foundation is being distributed according to the conditions and disclaimer in the Release Notes.

### XML support

This version of JBuilder provides features that speed and simplify the development of XML files. These features include syntax highlighting to review your XML code and a structure pane for XML files so you can navigate within your tree more easily. JBuilder includes a new Help viewer that supports XML, providing a natural browser view of your XML files.

### InternetBeans Express

InternetBeans Express is a set of components that enables dynamic content generation in web pages through both servlets and JSPs. In addition to generic content, InternetBeans Express leverages DataExpress to make it easy to display, navigate, update and append data sets.

To access InternetBeans Express, click the Design tab at the bottom of your content pane. InternetBeans Express is on a tab of the component palette. If necessary, scroll the tabs left to reveal the InternetBeans Express tab.

For more information, see "Using InternetBeans Express" in the Web Application Developer's Guide.

## Enterprise JavaBeans

JBuilder 4 makes it easier to create and deploy both session and entity bean components. A number of wizards (including EJB Group) streamline the creation, handling, and deployment of Enterprise JavaBeans. JBuilder 4 provides tools that simplify modeling and server configuration. It has Inprise ApplicationServer's Deployment Descriptor Editor built into the JBuilder IDE. JBuilder supports BEA's WebLogicTM Server 5.1.

One new aspect of JBuilder 4 is the EJB Group functionality. Each EJB Group represents a single deployable JAR that is created automatically by Make or Rebuild. Using the EJB Group wizard, you can also migrate existing EJBs. You can have multiple EJB groups per project.

The Entity Bean Modeler lets you create entity beans that map to existing tables. The modeler will both create all the necessary Java code and update the deployment descriptor stored in the EJB Group. Select an EJB Group to bring up the Entity Bean Modeler dialog.

With JBuilder 4, you can:

- Create entity and session beans using EJB wizards.
- Map entity beans to existing tables with the Entity Bean Modeler.
- Create EJB groups with the EJB Group wizard, so you can have any number of EJBs in a given application.
- Migrate existing EJBs into a new group or create an empty group from the EJB Group wizard.
- Use multiple EJB groups in a project.
- Create deployable JARs automatically using Make or Rebuild.
- View JAR contents in the node viewer.
- Test your applications in a local container or on your EJB 1.1-compliant application server with the Test Client wizard.
- Run EJBs from the EJB Run dialog in a local container or application server selected for the project.
- Deploy EJBs automatically when you run or debug them.
- View and edit your application server deployment descriptor using the Deployment Descriptor Editor.

To select any of the wizards or modelers mentioned above, choose File|New, select the Enterprise tab, and choose from the icons available.

The Enterprise JavaBeans Developer's Guide provides a comprehensive overview of what these features do and how to use them.

## Application server support

JBuilder 4 allows you to choose which application server to run on, allowing you to maintain different configurations for each one. To do so, select Project|Project Properties, select the Run tab and then the EJB tab. Default parameters are for the Inprise ApplicationServer, but BEA's WebLogicTM Server 5.1 can also be used directly from the JBuilder IDE: choose Tools|Enterprise Setup, select the Application Server tab, select the WebLogic tab, then set the directory path.

You may plug in other application servers through the OpenTools API.

JDBC connections are verified by JBuilder 4. Column data is available on the Persistence tab of the Deployment Descriptor Editor (DDE) view in the content pane.

The Deployment Descriptor Editor is compliant with JDK 1.3 and can read and write to EJB groups. The Deployment Descriptor Editor is integrated into the JBuilder interface. When used with WebLogicTM, it creates WebLogic deployment descriptors, so you can target your beans for the WebLogic server from within JBuilder.

## Team development

JBuilder 4 provides features that make team development faster, smoother, and easier.

Project files (`.jpr` and `.jpx`) are in two parts: private and shared. Windows, watches, and breakpoints are stored in the private side, while libraries and compiler options are stored in the shared side. This simplifies the process of sharing projects.

### Version tracking and control

JBuilder 4 provides revision support in every edition. To see version information for a file, click on the History tab at the bottom of the content pane. Tabs in the history view provide access to revision information. The tabs available depend on your JBuilder edition. For more information on the history pages, put your cursor in any of the history pages and press `F1`.

JBuilder automatically keeps backup copies of your file. You can store backup files outside your source directory, so it's easier to share your source. You can set how many backups to keep. The history pages can use these multiple backup copies as a rudimentary revision management system: you can access prior versions, and, in JBuilder Professional and Enterprise, you can apply the Diff engine to show the differences between versions of the same file.

> The following features are available in JBuilder Enterprise edition

JBuilder 4 provides support for CVS (Concurrent Versions System), a popular freeware version control system, and a suite of CVS tools accessible from the JBuilder interface. CVS is included in the Enterprise edition of JBuilder 4. Other version control systems can be incorporated using the OpenTools API.

For more information on version control in JBuilder, see "Team development using JBuilder".

## OpenTools API

The OpenTools API has been expanded and made easier to use and understand. You can alter something as small as a default path or design something as complex as your own wizard. The OpenTools features show you how.

Concept documents discuss the structure and nature of the elements of JBuilder that are included in the API. Expanded JavaDoc provides more specific and detailed technical information from within the source code. Samples show how to use OpenTools in real-life settings. For example, you can:

- Add root directories and define your favorite locations on the File|Open dialogs.
- Add keymaps.
- Plug in the servlet engine of your choice.
- Incorporate version control systems in addition to CVS.
- Customize the look and feel of the JBuilder interface.

The Concept Documents and JavaDoc are available from the Help viewer. Choose Help|Help Topics. The samples are in the `samples` directory of your JBuilder installation.

## User Interface changes

### JBuilder IDE

Most dialogs support multiple selection. When you start up, JBuilder remembers your last cursor position in open source files. You can choose URLs in pathnames. JBuilder can search for source packages automatically. The Package Migration tool tunes packages created in previous versions of JBuilder to be compatible with the new JDK and expanded feature set.

The AppBrowser lets you open as many instances of it as you like. If you have the same file open in different instances, changes you make to one copy are reflected in the others. In the content pane, file tabs are displayed only for the project that is selected in the project pane. If you select a different project, the file tabs change accordingly.

For more information on the AppBrowser, see "Introducing the AppBrowser" in the Quick Start.

JBuilder 4 allows you to:

- Browse hierarchies and drill down into subclasses with a click.
- Set your own pathnames and filenames for the files you create, change, and move.
- Delete files from your drive (not just from your project) by deleting them with your menu.

File|Open dialogs appear in a split window that simplifies navigation and selection. The left pane shows nodes; it can be expanded as needed. The right pane shows the contents of what is selected in the left pane. There is a navigation bar on the left edge that lets you select frequently-used locations with a single click. From this window, you can choose a root directory and select or delete single or multiple files.

The File|Open dialogs let you:

- Expand directory trees with a click.
- Search tree variants by typing inside the tree.
- Drill into `.zip` and `.jar` files by clicking on them in the tree.
- Add root directories using the OpenTools API.
- Navigate to frequently-used locations with a single click on the left-hand icon bar.
- Select and delete multiple files.
- Create folders by clicking on the New Folder icon at the top of the window.

### Wizards

Many new wizards have been added, and many existing wizards have been redesigned or expanded to make them easier to use and more powerful and effective. Wizards yield JavaDoc commentary. There is a new category of EJB wizards. Wizards that create components, such as panels and dialogs, are more accessible. The utility wizards are more sophisticated, including EJB, CORBA, and data module utilities.

- The Archive Builder supersedes the Deployment wizard. It builds a comprehensive archive of deployment preferences, based on the kind of application you're deploying. It's available from the Wizards menu. To learn more about the Archive Builder, see "Deploying Java programs" in the Quick Start, or "Deploying Java programs" in Building Applications with JBuilder.
- The Project wizard is extended. It lets you select an existing project as a template for a new project, change source and output directories, add required libraries, and edit root, project, source, backup, and output paths. To learn more about the new Project wizard, see "Managing projects" in the Quick Start or "Creating and managing projects" in Building Applications with JBuilder.
- New Library and New JDK wizards automatically search the directory you choose for the files you need. They are available from the Tools menu. Select Configure Libraries or Configure JDKs then click the New button.
- EJB wizards let you create, group, test, debug, and deploy Enterprise JavaBeans. The new EJB wizard matrix includes EJB Group, EJB Group From Descriptors, Enterprise JavaBean, EJB Entity Bean Modeler, and EJB Test Client from the Enterprise page of the object gallery, plus EJB Interfaces and Use EJB Test Client from the Wizards menu. These are covered in the "Enterprise JavaBeans" topic of this section.

To use wizards, select File|New or select Wizards from the main menu. Some wizards are in both places.

### Editor

To see the Editor menu, right-click in the Source pane. This menu is adjusted dynamically and has a Select All option.

- The editor supports tags, such as `@todo` tags.
- It places curly braces according to your Code Style settings.
- It aligns closing curly braces, but if you are using this in a JSP file make sure Java and JSP code are not on the same line.
- In CodeInsight, MemberInsight provides autocompletion as you type.

The editor has expanded in other key aspects: keymaps and keybinding customization, and Search and Save options.

Keymaps

Keyboard Mappings include emulations of four editors: CUA, Emacs, Brief, and Visual StudioTM. Visual StudioTM is keystroke compatible with Microsoft's Visual StudioTM. You can check or customize individual keybindings, including CodeInsight keybindings, in any editor emulation. To do so, select Tools|Editor Options, choose the Editor tab, and click the Customize button.

A grid of the keymaps is available from Help|Keyboard Mappings.

Search and Save

The editor includes expanded Search and Save options. To view or change Save options, click on Tools|Editor Options and select the Editor tab. Expand Save Options to view the list of options. They are:

- Strip Trailing Whitespace
- Change Leading Tabs To Spaces
- Change Leading Spaces To Tabs

Global search options are: Show Dialog When Search Fails (as opposed to showing a status bar message) and Search Word At Cursor. To access these, choose Tools|Editor Options, select the Editor tab, and expand Search Options.

Other search options are on the Find/Replace Text dialog. To access it, choose Search|Find. These options allow you to refine the textual parameters of your search.

Still more options are available in the Search|Find In Path dialog. You can define the paths as well as the textual parameters of your search.

CodeInsight's MemberInsight can automatically complete your code as you type.

For more information on the Editor, see "Using the editor" in the Quick Start. You can also use F1 Help in the dialog boxes.

## Running and Debugging

You can create new runtime configurations based on existing ones by choosing Run|Configurations and clicking Copy.

The debugger feature set has been expanded considerably. All debugger lists support multiple selection. Data and threads can be seen in a split view. You can toggle floating windows for debugger views: threads, breakpoints, and so on.

The list of enhancements include:

- Tool tip variable inspection.
- Evaluator method call evaluation.
- Evaluator variable inline assignment.
- Show/hide null value for any array type.
- Type in your own log message in the Breakpoint Properties dialog (select Run|Add Breakpoint and choose the kind of breakpoint).
- Cross-process breakpoint for client/server applications.
- Keep thread suspended option.
- Debug tab in the Runtime Properties dialog (select Run|Configurations) to set debugging preferences.
- Improved sourceless debugging.

For more information on the debugger, see "Debugging Java programs" in Building Applications with JBuilder. For more information on debugging distributed applications, see "Debugging distributed Applications" in the Distributed Application Developer's Guide.

## Database tools

The usability and functionality of the database tools is improved. There is a new UI for setting up database authentication.

### JDataStore

JDataStore is faster and more flexible. The underlying connection pool provides significant performance gains. JBuilder 4's support for JTA allows JDataStore connections to participate in distributed transactions using standard XA interfaces.

JDataStore Explorer allows you to create and manipulate tables graphically. It can create indexes for its tables.

JDataStore now supports cross joins, inner joins, and left, right, and full outer joins. (In this release, specify join columns by using the "natural" or "using" keywords.) JDataStore supports the SQL-92 join sequence and the JDBC "oj" escape sequence. It supports scalar subqueries.

JDataStore Server options are under the Options tab. The new UI shows more information about the server, including:

- Users connected.
- Open databases.
- History of events.

Database authentication allows you to password protect your JDataStore. There are two stages to the process: password protecting it, and opening it for different levels of access.

For more information on JDataStore, see the JDataStore Developer's Guide.

### JDBC Explorer improvements

The JDBC feature set has expanded:

- You can create tables graphically. To do so, select File|Create Table.
- Drivers not in the classpath are now displayed in red when defining a new URL.
- The Options dialog gives you more ways to control the JDBC Explorer.
- You can visually manipulate `jdbcexplorer.properties`.

For more information about the JDBC Explorer, see "JDBC Explorer: Overview" in the Database Application Developer's Guide.